<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDoubleCouponsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('double_coupons', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('userid')->comment('用户ID');
            $table->dateTime('starttime')->comment('券开始时间');
            $table->dateTime('endtime')->comment('券截至时间');
            $table->tinyInteger('status')->comment('状态');
            $table->string('type')->default('recharge')->commnet('类型:recharge, recommend');
            $table->string('info', 256)->nullable()->comment('预留字段');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('double_coupons');
    }
}
